package demo1;

//单线程场景下测试饿汉模式
public class DEMO_00 {
    public static void main(String[] args) {
        //获取第一个对象
        SingleHungry instance1= SingleHungry.get();
        System.out.println(instance1);

        //获取第二个对象
        SingleHungry instance2= SingleHungry.get();
        System.out.println(instance2);

        //获取第三个对象
        SingleHungry instance3= SingleHungry.get();
        System.out.println(instance3);
    }
}
